<template>
  <router-link class="oneShop" tag="div" :to="`/detail?id=${id}`">
    <div class="oneShop-img">
      <img :src="image" alt="">
    </div>
    <div class="oneShop-text">
      <p>{{ title }}</p>
      <span>￥{{ price }}</span>
    </div>
  </router-link>
</template>

<script>
export default {
  name: 'HomeHotShop',
  props: ['id', 'price', 'image', 'title']
}
</script>

<style lang="scss" scoped>
.oneShop {
  width: 110px;
  height: 130px;
  padding: 0 10px;
  &-img {
    width: 100%;
    img {
      width: 100%;
    }
  }
  &-text {
    font-size: 12px;
    padding: 0 5px;
    text-align: center;
    p {
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
    }
    span {
      color: red;
      font-size: 15px;
    }
  }
}
</style>
